package tools

// TreeAbleImplInt TreeAble 的 int 实现版本
type TreeAbleImplInt struct {
	Id       int        `json:"id"`
	Pid      int        `json:"pid"`
	Children []TreeAble `json:"children"`
}

func (i *TreeAbleImplInt) GetId() int64 {
	return int64(i.Id)
}

func (i *TreeAbleImplInt) GetPid() int64 {
	return int64(i.Pid)
}

func (i *TreeAbleImplInt) AddChildren(children []TreeAble) {
	i.Children = append(i.Children, children...)
}

// TreeAbleImplInt64 TreeAble 的 int64 实现版本
type TreeAbleImplInt64 struct {
	Id       int64      `json:"id"`
	Pid      int64      `json:"pid"`
	Children []TreeAble `json:"children"`
}

func (i *TreeAbleImplInt64) GetId() int64 {
	return i.Id
}

func (i *TreeAbleImplInt64) GetPid() int64 {
	return i.Pid
}

func (i *TreeAbleImplInt64) AddChildren(children []TreeAble) {
	i.Children = append(i.Children, children...)
}
